<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script type='text/javascript' src='js/vue.js'></script>
</head>

<body>
    <div id='app'>
        {{msg}}
        <p v-aaa="yy" v-bbb v-ccc="bg">qqqq</p>
    </div>

    <script type='text/javascript'>
        Vue.directive("aaa", {
            bind(el, binding) {
                // console.log(binding,6677);
                // el.style.color=binding.value;
            },
            inserted(el, binding) {
                console.log(el, binding.value, 888)
                el.style.color = binding.value;
            }
        })
        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'Hello Vue',
                yy: "yellow",
                bg:"pink"
            },
            methods: {},
            directives: {
                bbb: {
                    inserted(el, binding) {
                        console.log(el, binding.value, 888)
                        el.style.fontSize = "50px"
                    }
                },
                ccc:{
                    inserted(el, binding) {
                        console.log(el, binding, 999)
                        el.style.background = binding.value
                    }
                }
            }
        });


    </script>
</body>

</html>